<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
	prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
	prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
	prefix="logic"%>
<%@page language="java" pageEncoding="UTF-8"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-16" />

		<title>AGV Software</title>
		<link rel="stylesheet" href="/agvWeb/css/agvStyle.css" />
		<link rel="stylesheet" href="/agvWeb/css/jquery.ui.all.css" />

		<script src="/agvWeb/js/jquery-1.5.1.js"></script>
		<script src="/agvWeb/js/jquery.bgiframe-2.1.2.js"></script>
		<script src="/agvWeb/js/jquery.ui.core.js"></script>
		<script src="/agvWeb/js/jquery.ui.widget.js"></script>
		<script src="/agvWeb/js/jquery.ui.mouse.js"></script>
		<script src="/agvWeb/js/jquery.ui.draggable.js"></script>
		<script src="/agvWeb/js/jquery.ui.button.js"></script>
		<script src="/agvWeb/js/jquery.ui.position.js"></script>
		<script src="/agvWeb/js/jquery.ui.dialog.js"></script>
		<script src="/agvWeb/js/hoverIntent.js"></script>
		<script src="/agvWeb/js/jquery.ui.resizable.js"></script>
		<script src="/agvWeb/js/jquery.effects.core.js"></script>
		<script type="">
			$(function() {
				$( "#recuperarContra" ).button({
					text: true,
					icons: {
						primary: "ui-icon-key"
					}
				})
				.click(function() {

				});
				$( "#entrar" ).button({
					text: true,
					icons: {
						primary: "ui-icon-locked"
					}
				})
				.click(function() {
					document.forms[0].submit();
				});

				$( "#dialog-primerAcceso" ).dialog({
					closeOnEscape: true,    
					autoOpen: true,
					resizable: false,
					width: 450,
					height: 290,
					modal: true,
					buttons: {
						"actualizar contraseña": function() {
							document.forms[1].submit();
						}
					}
				});

				$( "#dialog-sinsesion" ).dialog({
					closeOnEscape: false,    
					open: function(event, ui) { $(".ui-dialog-titlebar-close").hide(); },
					autoOpen: true,
					resizable: true,
					height: 170,
					modal: true,
					buttons: {
						"aceptar": function() {
							$( this ).dialog( "close" );
						}
					}
				});

			});
		</script>
		<style>
label,input {
	display: block;
}

input.text {
	margin-bottom: 12px;
	width: 95%;
	padding: .4em;
}

fieldset {
	padding: 0;
	border: 0;
	margin-top: 25px;
}

h1 {
	font-size: 1.2em;
	margin: .6em 0;
}

div#users-contain {
	width: 350px;
	margin: 20px 0;
}

div#users-contain table {
	margin: 1em 0;
	border-collapse: collapse;
	width: 100%;
}

div#users-contain table td,div#users-contain table th {
	border: 1px solid #eee;
	padding: .6em 10px;
	text-align: left;
}

.ui-dialog .ui-state-error {
	padding: .3em;
}

.validateTips {
	border: 1px solid transparent;
	padding: 0.3em;
}
</style>
	</head>

	<body>
		<table style="width: 100%; height: 100%" border="0">
			<tr>
				<td colspan="2" width="100%" height="80px">
				</td>
			</tr>
			<tr>
				<td width="100%" height="80%">
				</td>
				<td valign="top" height="80%" >
					<html:form action="/agvLogin.do?method=login">

						<table cellpadding="0" cellspacing="0" border="0"
							style="width: 100%; height: 100%; margin: 0px;" >
							<tr>
								<td style="width: 15px; height: 46px; vertical-align: bottom;">
									<img src="/agvWeb/images/TopLeft.png"
										style="margin: 0px; width: 15px; height: 46px; vertical-align: bottom;" />
								</td>
								<td
									style="width: 100%; padding-top: 10px; text-align: left; background: #FFFFFF url('/agvWeb/images/Top.png') repeat-x bottom;"
									valign="middle">
									<label
										style='text-decoration: none; font-family: sans-serif; font-weight: bold; font-size: 12px; color: #666;'>
										Inicio de Sesi&oacute;n
									</label>
								</td>
								<td style="width: 15px; height: 46px;">
									<img src="/agvWeb/images/TopRight.png"
										style="margin: 0px; width: 15px; height: 46px; vertical-align: bottom;"
										alt="" />
								</td>
							</tr>
							<tr>
								<td
									style="width: 15px; background-image: url('/agvWeb/images/Left.png'); background-repeat: repeat-y;">

								</td>
								<td
									style="widt: 100%; height: 100%; padding-left: 5px; padding-right: 5px; text-align: left; padding-bottom: 5px; vertical-align: top; background-color: #FFFFFF;">

									<div id="dialog-form" style="width: 250px; padding-top: 10px;">
										<label
											style="color: red; font-family: sans-serif; font-size: 10px;">
											* campos obligatorios
										</label>

										<label
											style="color: red; font-family: sans-serif; font-size: 10px; padding-top: 10px;">
											<html:messages id="msg" message="true">
												<font style="color: red; font-size: 10px;">
													Error:&nbsp;<bean:write name="msg" /> </font>
											</html:messages>
										</label>

										<form>
											<fieldset>
												<label for="idUsuario">
													<font
														style='text-decoration: none; font-family: sans-serif; font-weight: bold; font-size: 12px; color: red;'>
														* </font> usuario
												</label>
												<input type="text" name="cdUsuario" id="cdUsuario"
													class="text ui-widget-content ui-corner-all" />
												<label for="password">
													<font
														style="color: red; font-family: sans-serif; font-size: 12px;">
														* </font> contrase&ntilde;a
												</label>
												<input type="password" name="pwContra" id="pwContra"
													value="" class="text ui-widget-content ui-corner-all" />
											</fieldset>
										</form>
									</div>
									<div style="width: 255px;">
										<button id="recuperarContra">
											&iquest; olvido su contrase&ntilde;a ?
										</button>
										<button id="entrar">
											entrar
										</button>
									</div>


								</td>
								<td
									style="width: 15px; height: 100%; background-image: url('/agvWeb/images/Right.png'); background-repeat: repeat-y;">
								</td>
							</tr>
							<tr>
								<td style="width: 15px; height: 15px;">
									<img src="/agvWeb/images/BottomLeft.png"
										style="margin: 0px; width: 15px; height: 15px;" alt="" />
								</td>
								<td
									style="width: 100%; background-image: url('/agvWeb/images/Bottom.png'); background-repeat: repeat-x;">
								</td>
								<td style="width: 15px; height: 15px;">
									<img src="/agvWeb/images/BottomRight.png"
										style="margin: 0px; width: 15px; height: 15px;" alt="" />
								</td>
							</tr>
						</table>
					</html:form>
				</td>
			</tr>
			<tr>
				<td colspan="2" width="100%" height="70px">
				</td>
			</tr>
		</table>
		<logic:present name="primerAcceso">
			<div id="dialog-primerAcceso"
				title="AGV Software - Primer inicio de sesi&oacute;n">
				<p style="padding-top: 10px;">
					<span class="ui-icon ui-icon-alert"
						style="float: left; margin: 0 7px 20px 0;"></span>Es su primer
					inicio de sesi&oacute;n. Bienvenido ! Es necesario asigne una
					contraseña a su usuario e ingrese el c&oacute;digo que fue enviado
					a su correo.
				</p>
				<label
					style="color: red; font-family: sans-serif; font-size: 10px; padding-top: 10px;">
					<html:messages id="msg" message="true">
						<font style="color: red; font-size: 10px;"> Error:&nbsp;<bean:write
								name="msg" /> </font>
					</html:messages>
				</label>
				<html:form action="/agvLogin.do?method=primerInicio">
					<fieldset>
						<label for="idUsuario">
							<font
								style='text-decoration: none; font-family: sans-serif; font-weight: bold; font-size: 12px; color: red;'>
								* </font> nueva contrase&ntilde;a
						</label>
						<input type="password" name="pwContra" id="cdUsuario"
							class="text ui-widget-content ui-corner-all" />
						<label for="password">
							<font
								style="color: red; font-family: sans-serif; font-size: 12px;">
								* </font> c&oacute;digo de acceso
						</label>
						<input type="password" name="cdAcceso" id="pwContra" value=""
							class="text ui-widget-content ui-corner-all" />
					</fieldset>
				</html:form>


			</div>
		</logic:present>
		<logic:present name="sinSesion" scope="request">
			<div id="dialog-sinsesion"
				title="AGV Software - Nuevo catalogo registrado">
				<p style="padding-top: 10px;">
					<span class="ui-icon ui-icon-alert"
						style="float: left; margin: 0 7px 20px 0;"></span> Su
					sesi&oacute;n ha caducado por inactividad. Por favor inicie
					sesi&oacute;n de nuevo en el sistema.
				</p>
			</div>
		</logic:present>

	</body>

</html>